﻿Imports KOR.Helpers
Imports KOR.Helpers.Data

Public Class TapeLength
    Inherits Telerik.Web.UI.RadAjaxPage

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not IsPostBack Then
            rgTapeLength.DataBind()
        End If
    End Sub

    Private Sub btnSave_Click(sender As Object, e As EventArgs) Handles btnSave.Click
        Try
            Dim dict As New Dictionary(Of String, Object)
            dict.Add("TapeLength", txtTapeLength.Text)
            dict.Add("CreatedDate", DateTime.Now)

            BL.TapeLengths.InsertTapeLength(dict)
            rgTapeLength.DataBind()

            txtTapeLength.Text = ""
        Catch ex As Exception
            WebMsgBox.ShowError(ex.Message)
        End Try
    End Sub

End Class